package com.sykj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sykj.bean.Mygold;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * @program: BeautyClub
 * @description:
 * @author: qiaoli
 * @create: 2020-08-15 16:19
 */
@Component
@Mapper
public interface MygoldMapper  {

@Select(
     "   SELECT "+
      "  beauty_num "+
     "    from    "+
     "           bis_custom_user "+
     "   where custom_user_id=#{customUserId,jdbcType=VARCHAR} "
)
    public Mygold queryBybeautyNum(String customUserId);


    @Select(
            "SELECT pay_money FROM bis_business_order " +
                    "WHERE DATEDIFF(pay_time,NOW())=-1 " +
                    "  and  custom_user_id=#{customUserId,jdbcType=VARCHAR}  "
    )
    public  Mygold  queryBypayNum(String customUserId);


    @Select(
            " select  sum(pay_money) as z_money   from   bis_business_order bbo "+
                    "  where  custom_user_id=#{customUserId,jdbcType=VARCHAR}     "
    )
    public Mygold selectByZnum(String customUserId);
}
